<template>
	<view class="settinglrx">

		<!-- 顶部头像区域 -->
		<view class="settop">
			<image class="settopleftimg" src="../../static/images/lrx/image_touxiang@3x.png" mode=""></image>
			<view class="settoplefttext">
				<view class="settoplefttext-title">
					{{accountName}}
				</view>
				<view class="settoplefttext-sectitle">
					大众奥迪-A6L-新能源
				</view>
			</view>
			<image class="settoprightimg" src="../../static/images/lrx/button_toright.png" mode=""></image>
		</view>


		<!-- 地址管理 -->
		<view class="addressManagement">
			<view class="addressitem">
				<text class="addressitem-title">地址管理</text>
				<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
			</view>
			<view class="addressitem">
				<text class="addressitem-title">账户安全</text>
				<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
			</view>
			<navigator url="/pages/messageSetting/messageSetting">
				<view class="addressitem">
					<text class="addressitem-title">消息设置</text>
					<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
				</view>
			</navigator>

			<view class="addressitem">
				<text class="addressitem-title">支付管理</text>
				<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
			</view>
		</view>


		<!-- 意见反馈 -->

		<view class="addressManagement">
			<view class="addressitem">
				<text class="addressitem-title">意见反馈</text>
				<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
			</view>
			<view class="addressitem">
				<text class="addressitem-title">关于赤兔APP</text>
				<image class="addressitem-img" src="../../static/images/lrx/button_toright.png" mode=""></image>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		createNamespacedHelpers
	} from "vuex";
	let {
		// mapState,
		mapActions
	} = createNamespacedHelpers("users");
	export default {
		data() {
			return {
				accountName: "******",
			}
		},
		async onShow() {
			let data = await this.userInformation();
			this.accountName = data.custom.name;
		},
		computed: {},
		methods: {
			...mapActions(["userInformation"]),
		}
	}
</script>

<style scoped lang="scss">
	.settinglrx {

		// 上面头像
		.settop {
			border-top: 2rpx solid #f4f4f4;
			background-color: white;
			padding: 20rpx 40rpx;
			border-bottom-left-radius: 30rpx;
			border-bottom-right-radius: 30rpx;
			display: flex;
			justify-content: space-between;

			.settopleftimg {
				width: 120rpx;
				height: 120rpx;
			}

			.settoplefttext {
				width: 460rpx;
				padding-top: 20rpx;

				.settoplefttext-title {
					font-size: 32rpx;
				}

				.settoplefttext-sectitle {
					margin-top: 6rpx;
					font-size: 22rpx;
					color: gray;
				}
			}

			.settoprightimg {
				margin-top: 30rpx;
				width: 30rpx;
				height: 30rpx;
			}
		}

		// 地址管理
		.addressManagement {
			background-color: white;
			border-radius: 30rpx;
			margin: 30rpx 0rpx;

			.addressitem {
				display: flex;
				justify-content: space-between;
				padding: 10rpx 0rpx;
				border-bottom: 2rpx solid #f6f6f6;
				padding: 20rpx 40rpx;

				.addressitem-img {
					width: 36rpx;
					height: 36rpx;
				}
			}
		}

	}
</style>
